package com.chixing.dao;

import com.chixing.pojo.Department;

public interface DepartmentDao {
    /**
     * 根据主键查询
     * @param deptno 部门编号主键
     * @return 返回部门对象
     */
    public Department selectByPrimaryKey(int deptno);

    /**
     * 添加新部门
     * @param department
     * @return 返回受影响行数
     */
    public int insert(Department department);

    /**
     * 删除部门
     * @param deptno 部门编号
     * @return 返回受影响行数
     */
    public int delete (int deptno); // delete from dept wehre deptno = 101


    /**
     * 修改部门
     * @param department 部门对象
     * @return 返回受影响行数
     */
    public int update(Department department);
}
